<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@include file="/WEB-INF/jsp/common/common.jsp"%>
	<script >
	$(function(){
		
		$('#userForm').ajaxForm({
			beforeSubmit : function() {
				return true;
			},
			success : function(r) {
				if ( r.success ) {
					alert("用户信息修改成功");
				} else {
					alert("用户信息修改失败");
				}
			}
		}); 
		
		$("#updateBtn").click(function(){
			$("#userForm").submit();
		});
		
		$("#role").val("${user.role}");
	})
	</script>
</head>

<body>
<form id="userForm" action="${APP_PATH}/user/updateUser.do" method="post">
<input type="hidden" name="id" value="${user.id}"/>
<table  border="0" cellpadding="0" cellspacing="0" class="table_border">
 <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_right">
      <tr>
        <td width="25" height="26" align="right"><img src="../images/ico_location.gif" width="16" height="15" /></td>
        <td><strong>位置：</strong>首页&gt;权限管理&gt;用户维护&gt;修改用户</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" class="table_padding">
      <tr>
        <td align="center"><table border="0" cellpadding="0" cellspacing="0" class="box_table" id="box_table2">
          <thead>
            <tr>
              <td class="box_table_even">登录帐号：</td>
              <td class="box_table_odd"><span class="in">
                <input type="text" name="loginacct" value="${user.loginacct}"/>
                <span class="star">*</span></span></td>
            </tr>
            <tr>
              <td class="box_table_even">用户姓名：</td>
              <td class="box_table_odd"><span class="in">
                <input type="text" name="username" value="${user.username}"/>
                <span class="star">*</span></span></td>
            </tr>			
            <tr>
              <td class="box_table_even">电子邮件：</td>
              <td class="box_table_odd"><span class="in">
                <input type="text" name="email" value="${user.email}"/>
                <span class="star">*</span></span></td>
            </tr>
            <tr>
              <td class="box_table_even">登录密码：</td>
              <td class="box_table_odd"><span class="in">
                <input type="password" name="userpswd" value="${user.userpswd}"/>
                <span class="star">*</span></span></td>
            </tr>
            <tr>
              <td class="box_table_even">角色：</td>
              <td class="box_table_odd">
                 <select id="role" name="role">
                     <option value="">请选择</option>
                     <option value="0" >普通员工</option>
                     <option value="1">组长</option>
                     <option value="2">经理</option>
                 </select>
              </td>
            </tr>
          </thead>
          <tbody>
          </tbody>
        </table>
          <table border="0" cellpadding="0" cellspacing="0" class="operation" >
<thead>
		  		      <tr>
		  		        <td><input id="updateBtn" type="button" value="修改" />
	  		            <input type="button" value="返回" onclick="javascript: window.history.back();" /></td>
	  		          </tr>
  		        </thead>
	        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>
